﻿using System;

using BrightSword.Feber.Samples;

using Microsoft.VisualStudio.TestTools.UnitTesting;

using Tests.BrightSword.Feber.TestClasses;

namespace Tests.BrightSword.Feber
{
    [TestClass]
    public class SimpleSerializerTests
    {
        [TestMethod]
        public void TestSerialize()
        {
            var data = new ClassA
                       {
                           Integer = 42,
                           DateTime = new DateTime(2009,
                                                   2,
                                                   7),
                           String = "Black Saturday"
                       };

            // not strictly a meaningful test, as Print() simply writes to Console.Out, but we can ensure that there are no crashes here...
            Assert.AreEqual(@"{Integer:42,String:Black Saturday,DateTime:2009-02-07T00:00:00.0000000,}",
                            data.Serialize());
        }
    }
}